import { userService } from './../service/user';
import { User } from './../model/user';
import { V, Connection } from 'e:/mjwork/x-engine';
import * as WebSocket from "ws";
import { GameBase } from '../gamebase';

@V.Controller({
    type: Connection.WebSocket,
    url : "/sangong"
})
export class sangongGame extends GameBase {

    private gameType = 'sangong';

    onConnect() {

    }

    /**
     * 对核心事件进行响应，其余进行分发
     * @param ws 
     * @param message 
     */
    async onMessage(ws: WebSocket, message: string) {
        let [event,data,user] = await super.onCommonMessage(ws,message);
        if(!data || !user || !event){
            return;
        }
        user = user as User;
        
        

       

    }


}